package com.asset.controller;

import com.asset.service.UserService;
import com.asset.vo.AjaxJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class LoginController {
	@Autowired
	private UserService loginService;
	@RequestMapping("/login")
	public AjaxJson login(HttpServletRequest  req,String username, String password) {
		AjaxJson ajaxJson = new AjaxJson();
	    System.out.println(username);
		System.out.println(password);

		ajaxJson = loginService.login(username, password,req);
		System.out.println(1122);
		return ajaxJson;


	}
}

